package com.doyens.client;

import com.doyens.client.impl.UserClientFallback;
import com.doyens.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-provider",fallback = UserClientFallback.class)//声明feign的熔断器
public interface UserClient {

    @GetMapping("/user/{id}")
    public User queryUserById(@PathVariable("id")Long id );
}
